\documentclass{article}

\begin{document}

\title{Maintenance document}
\author{
  Andrei Palade \\
  John Dennis \\
  David McBrierty \\
  Hristo Georgiev \\
  Marco Sarconi \\
  Garry Sharp \\	
}
\maketitle
\newpage
\tableofcontents
\newpage
\section{Introduction}
This document contains a summary of the strategy adopted for testing and constructing the program, as well as brief description of the test harness of the tested modules.


\section{Strategy}

The testing was done using the Junit 4 Test Framework on Eclipse. The main method tested was getStates(String text, String pattern) which can be found in the Algorithm interface. This was the core point of our testing mainly because after we executed the test on paper we compared our results using standard output for each test as well as assertions using the unit tests. A table of the test written for each algorithm can be found in the following section.


\section{Test harness}


\small\addtolength{\tabcolsep}{-5pt} 
    \begin{tabular}{|p{1.0cm}|p{3cm}|p{2.5cm}|p{2.2cm}|p{2.5cm}|p{1.5cm}|} 
\hline 
Test number & Purpose & Test Data & Expected Outcome & Actual Outcome & Verdict \\ 
\hline 
BF1 & The number of the expected states for a single character pattern and a single character text (in the last state) & Pattern = ``P'' Text = ``P'' & 5 states & 5 states & PASSED \\ 
\hline 
BF2 & String used as a pattern and text will match in the final state and if the highlighting is aligned (in the last state) & Pattern = ``pat'' Text = ``pat'' & TRUE & TRUE & PASSED \\ 
\hline 
BF3 & Test if a pattern is found in the given text. The last state of the animation should indicate a match (in the last state) & Pattern = ``pat'' Text = ``tttttpattttt'' & TRUE & TRUE & PASSED \\  
\hline 
BF4 & Testing if the last highlighted character is the last character from the pattern (in the last state) & Text = ``ttttpattt'' Pattern = ``pat'' & TRUE & TRUE & PASSED \\ 
\hline 
BF5 & The sum of the start in text position and pattern length should be equal to the last character highlighted in text (in the last state) & Text = ``ttttttpattttt'' Pattern = ``pat'' & TRUE & FALSE & FAILURE \\ 
\hline 
\end{tabular} 


% KMP 

\begin{tabular}{|p{1.0cm}|p{3cm}|p{2.5cm}|p{2.2cm}|p{2.5cm}|p{1.5cm}|} 
\hline 
Test number & Purpose & Test Data & Expected Outcome & Actual Outcome & Verdict \\ 
\hline 
KMP1 & The number of the expected states for a single character pattern and a single character text (in the last state) & Pattern = ``P'' Text = ``P'' & 5 states & 5 states & PASSED \\ 
\hline 
KMP2 & String used as a pattern and text will match in the final state and if the highlighting is aligned (in the last state) & Pattern = ``pat'' Text = ``pat'' & TRUE & TRUE & PASSED \\ 
\hline 
KMP3 & Test if a pattern is found in the given text. The last state of the animation should indicate a match (in the last state) & Pattern = ``pat'' Text = ``tttttpattttt'' & TRUE & TRUE & PASSED \\  
\hline 
KMP4 & Testing if the last highlighted character is the last character from the pattern (in the last state) & Text = ``ttttpattt'' Pattern = ``pat'' & TRUE & TRUE & PASSED \\ 
\hline 
KMP5 & The sum of the start in text position and pattern length should be equal to the last character highlighted in text (in the last state) & Text = ``ttttttpattttt'' Pattern = ``pat'' & TRUE & FALSE & FAILURE \\ 
\hline 
\end{tabular} 

% BM 

\begin{tabular}{|p{1.0cm}|p{3cm}|p{2.5cm}|p{2.2cm}|p{2.5cm}|p{1.5cm}|} 
\hline 
Test number & Purpose & Test Data & Expected Outcome & Actual Outcome & Verdict \\ 
\hline 
BM1 & The number of the expected states for a single character pattern and a single character text (in the last state) & Pattern = ``P'' Text = ``P'' & 5 states & 5 states & PASSED \\ 
\hline 
BM2 & String used as a pattern and text will match in the final state and if the highlighting is aligned (in the last state) & Pattern = ``pat'' Text = ``pat'' & TRUE & TRUE & PASSED \\ 
\hline 
BM3 & Test if a pattern is found in the given text. The last state of the animation should indicate a match (in the last state) & Pattern = ``pat'' Text = ``tttttpattttt'' & TRUE & TRUE & PASSED \\  
\hline 
BM4 & Testing if the last highlighted character is the last character from the pattern (in the last state) & Text = ``ttttpattt'' Pattern = ``pat'' & TRUE & TRUE & FAILURE \\ 
\hline 
BM5 & The sum of the start in text position and pattern length should be equal to the last character highlighted in text (in the last state) & Text = ``ttttttpattttt'' Pattern = ``pat'' & TRUE & FALSE & FAILURE \\ 
\hline 
\end{tabular} 
\end{document}
